﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ImagesManagement.aspx.cs" Inherits="WCrawler.ImagesManagement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 276px;
        }
        .style2
        {
            width: 279px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="width:744px;">
            <tr>
                <td class="style1">
                    <asp:Label ID="Label1" runat="server" Text="Url"></asp:Label>
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtUrl" runat="server" Width="672px"></asp:TextBox>
                </td>
                <td class="style2">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Upload" 
                        Width="91px" />
                </td>
            </tr>
        </table>
        <br />
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="ImageLinqDataSource" 
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="ImageId" HeaderText="ImageId" 
                    ReadOnly="True" SortExpression="ImageId" />
                <asp:BoundField DataField="Name" HeaderText="Name" 
                    SortExpression="Name" ReadOnly="True" />
                <asp:TemplateField HeaderText="Host">
                    <ItemTemplate>
                        <asp:Image ID="hostImage" runat="server" ImageUrl='<%# Eval("HostUrl") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Local">
                    <ItemTemplate>
                        <asp:Image ID="localImage" runat="server" ImageUrl='<%# Eval("LocalUrl") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:LinqDataSource ID="ImageLinqDataSource" runat="server" 
            ContextTypeName="WCrawlerLib.LinqDataClassesDataContext" EntityTypeName="" 
            Select="new (ImageId, Name, HostUrl, LocalUrl)" TableName="Images">
        </asp:LinqDataSource>
    </div>
    </div>
    </form>
</body>
</html>
